// 引入封装的 axios 扩展
import axiosex from "../axiosex";
import type { IInOutRecordData } from "@/models/IInOutRecordData";
import type { IBaseRequest } from "@/models/IBaseRequest";
import type { IBaseResponse } from "@/models/IBaseResponse";
import type { IBasePagingData } from "@/models/IBasePagingData";
import type { IQueryByIntID } from "@/models/IQueryByIntID";

/**插入进出记录 */
export const InOutRecordData_AddData = (data: IInOutRecordData) =>
  axiosex.post(
    "/api/InOutRecordData/AddData",
    data
  ) as unknown as IBaseResponse<IInOutRecordData>;
/**删除进出记录 */
export const InOutRecordData_DeleteData = (data: IQueryByIntID) =>
  axiosex.delete("/api/InOutRecordData/DeleteData", {
    params: data,
  }) as unknown as IBaseResponse<Number>;

/**更新进出记录 */
export const InOutRecordData_UpdateData = (data: IInOutRecordData) =>
  axiosex.put(
    "/api/InOutRecordData/UpdateData",
    data
  ) as unknown as IBaseResponse<Number>;
/**根据主键查询进出记录 */
export const InOutRecordData_GetData = (data: IQueryByIntID) =>
  axiosex.get("/api/InOutRecordData/GetData", {
    params: data,
  }) as unknown as IBaseResponse<IInOutRecordData>;
/**分页查询进出记录 */
export const InOutRecordData_GetPageData = (data: IBaseRequest<IInOutRecordData>) =>
  axiosex.post("/api/InOutRecordData/GetPageData", data) as unknown as IBaseResponse<
    IBasePagingData<IInOutRecordData>
  >;